<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ page import="java.util.List"%>
<%@ page import="com.jaxplat.commons.Row"%>
<%@ page import="com.jaxplat.commons.RowImpl"%>
<%
    String contextPath = request.getContextPath();
	String flag = "";
	Row row = null;
	if (null != request.getAttribute("orderInfo")) {
		row = (Row) request.getAttribute("orderInfo");
	} else {
		row = new RowImpl();
	}
	String message = (String) request.getAttribute("message");
	flag = (String) request.getAttribute("flag");
	//获取付款信息
	RowImpl orderBillInfo = null;
	if (null != request.getAttribute("orderBillInfo")) {
	    orderBillInfo = (RowImpl) request.getAttribute("orderBillInfo");
	} else {
	    orderBillInfo = new RowImpl();
	}
%>
<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
<head>
    <meta name="keywords" content="<%=session.getAttribute("keywords") %>" />
    <meta name="description" content="<%=session.getAttribute("description") %>" />
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title>预约管理-云南移动无线城市</title>
	<link type="text/css" href="../css/wap.css" rel="stylesheet" />
</head>
<body>
<%=session.getAttribute("headerContentWeb")%>
	<div class="wap">
		<div class="navW">
			<div class="marginAout navIn">
				<span class="current"><a
					href="<%=request.getContextPath()%>/wap/index.jsp?portaltype=1&version=2&areacode=<%=session.getAttribute("areacode") %>">预约管理</a> </span><span><a
					href="<%=request.getContextPath()%>/wap/doctorAction.do?method=initSearch_s1">预约挂号</a>
				</span><span><a href="<%=request.getContextPath()%>/wap/guide.jsp?portaltype=1&version=2&areacode=<%=session.getAttribute("areacode") %>">用户指南</a>
				</span>
			</div>
		</div>
		<div class="bread_nav">
			<a
				href="<%=request.getContextPath()%>/wap/doctorAction.do?method=initSearch_s1"
				class="current">首页</a>
			<a href="#">&gt;</a>
			<a href="<%=contextPath%>/wap/reserveManageAction.do?method=reserverOrderList&flag=<%=flag%>"
				class="current">预约管理</a>&gt;</a>订单信息
		</div>
		<%
		    if (!"".equals(message) && message != null) {
		%>
		<%=message%>
		<%
		    }
					if (null != row) {
		%>
		<div class="h_div">
			<h1 class="h1">
				订单信息
			</h1>
		</div>
		<div class="tab_containt">
			<div class="list_table">
				<table border="0" cellspacing="0" cellpadding="0" width="100%"
					class="infro_table">
					<thead>
					<tr>
						<th class="apps_firstth1 apps_firstth2 textL" colspan="2">
							就医信息
						</th>
					</tr>
					</thead>
					<tbody>
					<tr>
						<td class="apps_firstth1 textR" width="100px">
							订单编号
						</td>
						<td class="apps_firstth2"><%=row.get("orderId")%></td>
					</tr>
					<tr>
						<td class="apps_firstth1 textR">
							提交时间
						</td>
						<td class="apps_firstth2"><%=row.get("createTime")%></td>
					</tr>
					<tr>
						<td class="apps_firstth1 textR">
							医院
						</td>
						<td class="apps_firstth2"><%=row.get("hospitalName")%></td>
					</tr>
					<tr>
						<td class="apps_firstth1 textR">
							科室及类别
						</td>
						<td class="apps_firstth2"><%=row.get("sectionName")%>-<%=row.get("secType")%></td>
					</tr>
					<tr>
						<td class="apps_firstth1 textR">
							医生
						</td>
						<td class="apps_firstth2"><%=row.get("doctorName")%></td>
					</tr>
					<tr>
						<td class="apps_firstth1 textR">
							预约时间
						</td>
						<td class="apps_firstth2"><%=row.get("reserveTime")%></td>
					</tr>
					<tr>
						<td class="apps_firstth1 textR">
							支付状态
						</td>
						<td class="apps_firstth2">
							<%
							    if ("1".equals(row.get("payStatus").toString())) {
							%>
							未付款
							<%
							    } else if ("2".equals(row.get("payStatus").toString())) {
							%>
							已付款
							<%
							    } else if ("3".equals(row.get("payStatus").toString())) {
							%>
							已退款
							<%
							    }
							%>
						</td>
					</tr>
					<tr>
						<td class="apps_firstth1 textR">
							预约状态
						</td>
						<td class="apps_firstth2">
							<%
							    if ("1".equals(row.get("reserveStatus").toString())) {
							%>
							保留号
							<%
							    } else if ("2".equals(row.get("reserveStatus").toString())) {
							%>
							取消保留号
							<%
							    } else if ("3".equals(row.get("reserveStatus").toString())) {
							%>
							保留号过期
							<%
							    } else if ("4".equals(row.get("reserveStatus").toString())) {
							%>
							待赴约
							<%
							    } else if ("5".equals(row.get("reserveStatus").toString())) {
							%>
							已退号
							<%
							    } else if ("6".equals(row.get("reserveStatus").toString())) {
							%>
							已赴约
							<%
							    } else if ("7".equals(row.get("reserveStatus").toString())) {
							%>
							爽约
							<%
							    }
							%>
						</td>
					</tr>
					</tbody>
				</table>
				<table border="0" cellspacing="0" cellpadding="0" width="100%"
					class="infro_table">
					<thead>
					<tr>
						<th class="apps_firstth1 apps_firstth2 textL" colspan="2">
							申请人信息
						</th>
					</tr>
					</thead>
					<tbody>
					<tr>
						<td class="apps_firstth1 textR" width="100px">
							申请人
						</td>
						<td class="apps_firstth2"><%=row.get("applicantName")%></td>
					</tr>
					<tr>
						<td class="apps_firstth1 textR">
							证件号
						</td>
						<td class="apps_firstth2"><%=row.get("idNo")%></td>
					</tr>
					<tr>
						<td class="apps_firstth1 textR">
							性别
						</td>
						<td class="apps_firstth2">
							<%
							    if ("m".equals(row.get("gender").toString())) {
							%>男<%
							    } else {
							%>女
							<%
							    }
							%>
						</td>
					</tr>
					<tr>
						<td class="apps_firstth1 textR">
							出生年月
						</td>
						<td class="apps_firstth2"><%=row.get("birthDate")%></td>
					</tr>
					<tr>
						<td class="apps_firstth1 textR">
							手机号
						</td>
						<td class="apps_firstth2"><%=row.get("mobileNo")%></td>
					</tr>
					</tbody>
				</table>
				<%if(!"1".equals(row.get("payStatus").toString())) { %>
				<table border="0" cellspacing="0" cellpadding="0" width="100%"
					class="infro_table">
					<thead>
					<tr>
						<th class="apps_firstth1 apps_firstth2 textL" colspan="2">
							付款信息
						</th>
					</tr>
					</thead>
					<tbody>
					<tr>
					    <td class="apps_firstth1 textR" width="100px">
							支付方向
						</td>
						<td class="apps_firstth2">
						   <% if("pay".equals(orderBillInfo.get("direction"))) {%>
					      		 支付
					       <%} else if("refund".equals(orderBillInfo.get("direction"))) {%>
					           	退款
					       <%} %>
						 </td>
					</tr>
					<tr>	 
						<td class="apps_firstth1 textR" width="100px">
							金额
						</td>
						<td class="apps_firstth2"><%=orderBillInfo.get("amount")%></td>
					</tr>
					<tr>
					    <td class="apps_firstth1 textR" width="100px"> 支付类型</td>
						<td class="apps_firstth2">
							<%
							  if(null != orderBillInfo.get("payType") && !"".equals(orderBillInfo.get("payType"))) {
							    if ("1".equals(orderBillInfo.get("payType").toString())) {
							%>
							手机支付
							<%
							    } else if ("2".equals(orderBillInfo.get("payType").toString())) {
							%>
							现场支付
							<%
							    } else {
							%>
							网银
							<%
							    }
							  }
							%>
						</td>
					</tr>
					<tr>
						<td class="apps_firstth1 textR" width="100px">付款时间</td>
						<td class="apps_firstth2">
						<%if(null != orderBillInfo.get("mpayTime") && !"".equals(orderBillInfo.get("mpayTime"))) { %>
					     <%=orderBillInfo.get("mpayTime")%>
					    <%} %>
					   </td>
					</tr>
					</tbody>
				</table>
				<%} %>
				<div class="btn_div">
					<%if("1".equals(row.get("payStatus").toString()) && "1".equals(row.get("reserveStatus").toString())) { %>
					   <!-- 未付款，并且预约保留未过期，是”取消订单“ -->
					   <input type="button" class="btnN2" value="继续支付"
					     onclick="location.href='<%=contextPath%>/wap/reserve.do?method=repay&orderId=<%=row.get("orderId")%>'"/>&nbsp;&nbsp;
					   <input type="button" class="btnN2" value="取消订单"
					    onclick="location.href='<%=contextPath%>/wap/reserveManageAction.do?method=cancelOrder&flag=<%=flag%>&orderId=<%=row.get("orderId")%>&browseFalg=wap'"/>
					<%} else if ("2".equals(row.get("payStatus").toString()) && "4".equals(row.get("reserveStatus").toString())){ %>
					   <!-- 已经付款的，并且预约未过期的，才出现“退号" -->
						<input type="button" class="btnN2" value="退号"
						onclick="location.href='<%=contextPath%>/wap/reserveManageAction.do?method=refund&flag=<%=flag%>&orderId=<%=row.get("orderId")%>&browseFalg=wap'" />
						&nbsp;&nbsp;
						<input type="button" class="btnN2" value="返回" onclick="location.href='<%=contextPath%>/wap/reserveManageAction.do?method=reserverOrderList&flag=<%=null != flag && !"".equals(flag)? flag:"2" %>'" />
					<%} %> 					
				</div>
			</div>
		</div>
		<%
		    }
		%>
	</div>
<%=session.getAttribute("footerContentWeb")%>
</body>
</html>